package com.buka.menu.controller;

import com.buka.user.entity.User;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@WebServlet("/role/listByUser")
public class ListByUserServlet extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        //登录成功之后。用户信息存到了session

        HttpSession session = req.getSession();
        User loginUser = (User) session.getAttribute("loginUser");
        Long id = loginUser.getId();
        //使用用户id查询当前用户的菜单列表



    }
}
